﻿using BW.MLTT.Domain.Entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.MLTT.Repository
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class MLTTDbContext : DbContext
    {
        public MLTTDbContext(DbContextOptions<MLTTDbContext> options) : base(options)
        {

        }
        public DbSet<T_User> Users {  get; set; }
        public DbSet<T_Images> Imagess {  get; set; }
        public DbSet<T_Good> Goods {  get; set; }
        public DbSet<T_Cultivation> Cultivations {  get; set; }
        public DbSet<T_CultivationEnterprise> CultivationEnterprises {  get; set; }
        public DbSet<T_Immune> Immunes {  get; set; }
        public DbSet<T_GoodImmune> GoodImmunes {  get; set; }
        public DbSet<T_Slaughter> Slaughters {  get; set; }
        public DbSet<T_SlaughterEnterprise> SlaughterEnterprises {  get; set; }
        public DbSet<T_Supplier> Suppliers {  get; set; }
        public DbSet<T_Process> Processs {  get; set; }
        public DbSet<T_ProcessEnterprise> ProcessEnterprises {  get; set; }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer("server=.;uid=sa;pwd=123456;database=MLTT_666");
            base.OnConfiguring(optionsBuilder);
        }
    }
}
